#include "stdafx.h"
#include "texture2dmap.h"

namespace GLC {

TextureMap::TextureMap(Texture2DRef texture)
:m_texture(texture)
,m_sx(1)
,m_sy(1)
,m_dx(0)
,m_dy(0)
,m_rotation(0)
{
}

TextureMap::~TextureMap(void)
{
}

Texture2DRef const& TextureMap::GetTexture()const
{
    return m_texture;
}

bool TextureMap::IsLoaded()const
{
    return (! m_texture.isNull());
}

void TextureMap::AttachTexture(Texture2DRef textureId)
{
    m_texture = textureId;
}

void TextureMap::SetScale(float sx, float sy)
{
    m_sx = sx;
    m_sy = sy;
}

void TextureMap::SetOffset(float dx, float dy)
{
    m_dx = dx;
    m_dy = dy;
}

void TextureMap::SetRotation(float rotation)
{
    m_rotation = rotation;
}
} // namespace GLC
